package com.atXiao.taste.recommand;

import java.time.LocalTime;
import java.util.ArrayList;
import java.util.List;

public class WeatherBasedRecommendation {

    public static List<String> recommendFoods(String weather, double temperature, LocalTime time, String season) {
        List<String> recommendedFoods = new ArrayList<>();


        // 根据天气、温度、时间和季节等条件生成推荐
        if (weather.equals("Sunny") && temperature > 25 && time.isAfter(LocalTime.of(12, 0)) && time.isBefore(LocalTime.of(18, 0))) {
            recommendedFoods.add("冰淇淋");
            recommendedFoods.add("清爽沙拉");
        } else if (weather.equals("Rainy") && time.isAfter(LocalTime.of(18, 0))) {
            recommendedFoods.add("热汤");
            recommendedFoods.add("热奶茶");
        } else if (season.equals("Winter") && temperature < 10) {
            recommendedFoods.add("暖胃火锅");
            recommendedFoods.add("热巧克力");
        }

        return recommendedFoods;
    }

    public static void main(String[] args) {
        // 示例数据
        String currentWeather = "Winter";
        double currentTemperature = 0.0;
        LocalTime currentTime = LocalTime.of(18, 30);
        String currentSeason = "Winter";

        // 获取美食推荐
        List<String> recommendations = recommendFoods(currentWeather, currentTemperature, currentTime, currentSeason);
        System.out.println("Recommended Foods: " + recommendations);
    }
}
